package com.flurry.android;

import android.content.Context;
import android.text.TextUtils;
import java.util.List;
import java.util.Locale;
import java.util.Map;

final class fj
  implements ba
{
  private static final String p = fj.class.getSimpleName();
  private final Map<String, ba> gQ;

  public fj(Map<String, ba> paramMap)
  {
    this.gQ = paramMap;
  }

  public final ae a(Context paramContext, FlurryAds paramFlurryAds, cw paramcw, AdUnit paramAdUnit)
  {
    ae localae;
    if ((paramContext == null) || (paramFlurryAds == null) || (paramcw == null) || (paramAdUnit == null))
    {
      localae = null;
      return localae;
    }
    List localList = paramAdUnit.getAdFrames();
    if ((localList == null) || (localList.isEmpty()))
      return null;
    AdFrame localAdFrame = (AdFrame)localList.get(0);
    if (localAdFrame == null)
      return null;
    String str = localAdFrame.getContent().toString();
    if (TextUtils.isEmpty(str))
      return null;
    if (this.gQ != null);
    for (ba localba = (ba)this.gQ.get(str.toUpperCase(Locale.US)); ; localba = null)
    {
      if (localba == null)
        return null;
      new StringBuilder().append("Creating ad network takeover launcher: ").append(localba.getClass().getSimpleName()).append(" for type: ").append(str).toString();
      localae = localba.a(paramContext, paramFlurryAds, paramcw, paramAdUnit);
      if (localae != null)
        break;
      cy.d(p, "Cannot create ad network takeover launcher for type: " + str);
      return localae;
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.fj
 * JD-Core Version:    0.6.2
 */